﻿/**
 * Copyright (C) 2011 original author and authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NGuice.Inject.Spi
{
    //complete!
    /// <summary>
    /// 从一个固定的实例转换到一个新类型的创建的绑定。源绑定域新绑定具有相同的绑定元特性，但具有不同的类型
    /// </summary>
    public interface IConvertedConstantBinding<T> : IBinding<T>, IHasDependencies
    {
        /// <summary>
        /// 获取转换的值
        /// </summary>
        T Value
        {
            get;
        }

        /// <summary>
        /// 用于转换常数的类型转换绑定
        /// </summary>
        TypeConverterBinding TypeConverterBinding
        {
            get;
        }

        /// <summary>
        /// 获取源绑定key。这个绑定能够从一个注入器中使用NGuice.Inject.Injector.GetBinding(key)中解析
        /// </summary>
        Key<string> SourceKey
        {
            get;
        }

        ///// <summary>
        ///// 获取包含转换key依赖的集合。这里dynamic参数为Dependency对象
        ///// </summary>
        //new ISet<dynamic> Dependencies
        //{
        //    get;
        //}
    }
}
